package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-05-26
 * Time: 11:57
 */
public class BookList {
    //组合的方式，初始化书架
    private Book[] books = new Book[10];
    private int usedSize;//实际放的，书的个数

    //初始化书架（放书）
    public BookList() {
        this.books[0] = new Book("三国演义", "罗贯中", 12, "小说");
        this.books[1] = new Book("红楼梦", "曹雪芹", 13, "小说");
        this.books[2] = new Book("西游记", "吴承恩", 14, "小说");

        this.usedSize = 3;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(Book[] books, int pos) {
        this.books[pos] = books[pos];
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
}
